package phone.qyg.com.qyg.model;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * 作者：lblbh on 2017/12/1 10:00
 * 邮箱：lanbuhan@163.com
 * 功能：活动详情
 */
public class ActivityDetail extends Base implements Parcelable {

    /**
     “title”:”快乐的世界” //活动名称
     “fixImgUrl”:”http://domain:port/data/2017/04/13/223.jpg” //缩略图

     “address”:”呼和浩特28号” //活动地址
     “phone”:”04718828” //活动电话
     “signStartTime”:”2017-11-19 09:00”  //预约开始时间
     “signEndTime”:”2017-11-19 09:00”  //预约结束时间
     “startTime”:”2017-11-19 09:00” //活动开始时间
     “endTime”:”2017-11-19 09:00” //活动结束时间

     “sponsor”:”上海丹朱棋艺”
     “memCount”:10 //报名人数
     “speaker”:”李UIUIu” //主讲人
     “limitPerson”:”30”,           //限制人数
     “limitStr”:”限制报名10人”,   //限制报名人
     “isCollection”:0,             //是否收藏 0-为收藏，1-已收藏
     "longitude": “116.2343”, // 经度
     "latitude": “40.123123”, // 纬度
     “shareAddress” :
     ”http://domain:port/actinfo/sportcontentview/11.shtml”,//分享地址
     actDeclare 活动声明
     applyBtn  //是否可报名  0 不可 1可以
     */

    public int isHtml;//默认0 more 1-其他字段
    public int memCount;
    public int applyBtn;
    public int isCollection;
    public String phone;
    public String speaker;
    public String address;
    public String sponsor;
    public String endTime;
    public String limitStr;
    public String latitude;
    public String startTime;
    public String longitude;
    public String actDeclare;
    public String signEndTime;
    public String limitPerson;
    //    public String shareAddress;
    public String signStartTime;

    public ActivityDetail(){}

    @SuppressWarnings("unchecked")
    public ActivityDetail(Parcel in) {
        id = in.readInt();
        isHtml = in.readInt();
        more = in.readString();
        title = in.readString();
        endTime = in.readString();
        address = in.readString();
        latitude = in.readString();
        startTime = in.readString();
        longitude = in.readString();
        fixImgUrl = in.readString();
        actDeclare = in.readString();
        shareAddress = in.readString();
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(id);
        dest.writeInt(isHtml);
        dest.writeString(more);
        dest.writeString(title);
        dest.writeString(endTime);
        dest.writeString(address);
        dest.writeString(latitude);
        dest.writeString(startTime);
        dest.writeString(longitude);
        dest.writeString(fixImgUrl);
        dest.writeString(actDeclare);
        dest.writeString(shareAddress);
    }


    public static final Creator<ActivityDetail> CREATOR = new Creator<ActivityDetail>() {
        @Override
        public ActivityDetail[] newArray(int size) {
            return new ActivityDetail[size];
        }

        @Override
        public ActivityDetail createFromParcel(Parcel in) {
            return new ActivityDetail(in);
        }
    };
}
